<template>
  <div>
    <van-button @touchstart.stop="show = true">
      弹出默认键盘
    </van-button>
    <input @touchstart.stop="show = true" v-model="value" />
    <van-number-keyboard
      v-model="value"
      :show="show"
      extra-key="."
      close-button-text="关闭"
      @blur="show = false"
      @input="onInput"
      @delete="onDelete"
    />
  </div>
</template>

<script>
  import Vue from 'vue';
  import { NumberKeyboard } from 'vant';

  Vue.use(NumberKeyboard);
  export default {
    data() {
      return {
        show: true,
        value:''
      }
    },

    methods: {
      onInput(value) {
        Toast(value);
      },
      onDelete() {
        Toast('删除');
      }
    }
  }
</script>

<style>
</style>
